import type * as echarts from "echarts";

export interface EchartsPlotRef {
  getInstance(): echarts.EChartsType;

  setOption(options: echarts.EChartsOption, notMerge?: boolean, lazyUpdate?: boolean): void;

  setOption(options: echarts.EChartsOption, opts?: echarts.SetOptionOpts): void;

  getOption(): echarts.EChartsOption;

  dispatchAction(
    payload: echarts.Payload,
    opt?:
      | boolean
      | {
          silent?: boolean;
          flush?: boolean | undefined;
        },
  ): void;

  resize(opts: echarts.ResizeOpts): void;

  reset(opts?: echarts.EChartsOption): void;
}
